package com.cdz.charger.controller;

import com.cdz.charger.service.IDataStatisticsService;
import com.cdz.charger.vo.DataStatisticsVo;
import com.cdz.common.core.domain.R;
import com.cdz.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 数据统计
 */
@RestController
@RequestMapping("/charger/dataStatistics")
public class DataStatisticsController {

    @Autowired
    private IDataStatisticsService dataStatisticsService;

    /**
     * 统计充电桩各状态数量
     *
     * @return
     */
    @GetMapping("/chargerCount")
    public R<List<DataStatisticsVo>> getChargerCount() {
        List<DataStatisticsVo> list = dataStatisticsService.getChargerCount();
        return R.ok(list);
    }

}
